
<?php include_once(dirname(__FILE__) . '/../general/head.php'); ?>

<!-- header -->
<?php include_once(dirname(__FILE__) . '/../general/header.php'); ?>

<?php //include_once('left.php'); ?>


<div id="page-wrapper" style="margin-left: auto;min-height: 850px;">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                <div style="text-align: center;">
                    <font color="blue"><?php echo $result->quiz_name; ?></font>
                    </div>
            </h1>

        </div>
    </div>
    
    <?php
    if($error){
    ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-danger">
                <div class="panel-heading">
                    <?php echo $message; ?>
                </div>
            </div>
        </div>
    </div>
    <?php } ?>
    
    <div class="row">
        <div class="col-lg-12"> 
            <div class="panel panel-default">
                <div class="panel-heading">
                    Hướng dẫn làm bài kiểm tra
                </div>
                <div class="panel-body">
                    
<!--                    <p>Thời hạn làm bài: 
                    <table>
                        <tr>
                            <td width="50px">Từ: </td>
                            <td><?php echo date("Y-m-d H:i:s", $result->start_time); ?></td>
                        </tr>
                        <tr>
                            <td>Đến: </td>
                            <td><?php echo date("Y-m-d H:i:s", $result->end_time); ?></td>
                        </tr>

                    </table>
                    </p>
                    <br>
                    <p>
                        Thời gian làm bài: <?php echo $result->duration; ?> phút
                    </p>-->
                    <br>
                    <?php echo $result->description; ?>
                    <br>
                    <div style="text-align: center;">
                        <input type="button" value="Bắt Đầu" onClick="javascript:window.location = '<?php echo site_url(get_folder($loggedUser['title']).'/quizzes/access_test/' . $result->quid); ?>'" class="btn btn-primary">
                    </div>
                    
                </div>
            </div>

        </div>
    </div>









    <?php if (false) { ?>
        <div id="content" class="testd"><br><br>
            <h1><?php
                if ($title) {
                    echo $title;
                }
                ?>
            </h1>
            <br>

            <?php
            if ($resultstatus) {
                echo "<div id='result'>" . $resultstatus . "</div>";
            }
            ?>

            <tr><td >Quiz Name</td><td></td></tr>
            <tr><td valign="top">Description</td><td><?php echo $result->description; ?></td></tr>
            <tr><td valign="top">Duration</td><td> Minutes</td></tr>
            <tr><td valign="top">Start time</td><td></td></tr>
            <tr><td valign="top">End time</td><td></td></tr>
            <tr><td valign="top">Percentage required to pass</td><td><?php echo $result->pass_percentage; ?>%</td></tr>
            <tr><td valign="top">Test type</td><td><?php
                    if ($result->test_type == "1") {
                        echo "Paid ( credit require: " . $result->credit . ")";
                    } else {
                        echo "Free";
                    }
                    ?>
            <tr><td valign="top">Maximum Attempts</td><td><?php echo $result->max_attempts; ?> </td></tr>
            <tr><td valign="top">Correct answer score</td><td><?php echo $result->correct_score; ?> </td></tr>
            <tr><td valign="top">Incorrect answer score</td><td><?php echo $result->incorrect_score; ?> </td></tr>
            <tr><td valign="top"></td><td>
                    <input type="button" Value="Start Test" onClick="javascript:window.location = '<?php echo site_url('quiz/access_test/' . $result->quid); ?>'">

                </td></tr>

            </td></tr>



            </table></div>
    <?php } ?>


</div>

</div>
<!-- /#page-wrapper -->

<?php include_once(dirname(__FILE__) . '/../general/footer.php'); ?>